home *** CD-ROM | disk | FTP | other *** search
- /*
- **
- ** WaitSignal 1.0
- **
- ** (c) 1998 Stephan Fuhrmann
- **
- */
-
- #include <proto/dos.h>
- #include <proto/exec.h>
-
- #include <exec/types.h>
- #include <dos/dos.h>
-
- #define APPNAME "WaitSignal"
-
- char vv[]="$VER: WaitSignal 1.0 " __AMIGADATE__;
-
- char template[]="ALL/S,C/S,D/S,E/S,F/S";
-
- enum templates { RA_ALL=0,RA_C,RA_D,RA_E,RA_F,RA_NUM};
-
- LONG tempres [RA_NUM];
-
- struct RDArgs *RDA;
-
- struct DosLibrary *DOSBase;
-
- __saveds int main(void)
- {
- if (DOSBase=(struct DosLibrary *)OpenLibrary ("dos.library",37))
- {
- if (RDA=ReadArgs (template,tempres,0L))
- {
- long mask=0L;
-
- if (RA_ALL)
- mask|=SIGBREAKF_CTRL_C | SIGBREAKF_CTRL_D |
- SIGBREAKF_CTRL_E | SIGBREAKF_CTRL_F;
-
- if (RA_C)
- mask|=SIGBREAKF_CTRL_C;
-
- if (RA_D)
- mask|=SIGBREAKF_CTRL_D;
-
- if (RA_E)
- mask|=SIGBREAKF_CTRL_E;
-
- if (RA_F)
- mask|=SIGBREAKF_CTRL_F;
-
- if (!mask)
- mask|=SIGBREAKF_CTRL_C;
-
- Wait (mask);
-
- FreeArgs (RDA);
- }
- else
- PrintFault (IoErr(),APPNAME);
-
- CloseLibrary ((struct Library *)DOSBase);
- }
- }
-
-